namespace Project_Schedule.Domain.Request;

public class JRequest
{
    public DateTime AskTime { get; set; }
    
    public bool Success { get; set; }
    
    public object? Data { get; set; }
    
    public string? Message { get; set; }

    public static JRequest Ok(object data,
        bool success = true,
        string message = "Request Success")
    {
        return new JRequest
        {
            Success = success,
            AskTime = DateTime.Now,
            Data = data,
            Message = message
        };
    }
}